// 设备数据接口
export interface DeviceData {
  id: string;
  name: string;
  type: string;
  status: 'online' | 'offline' | 'warning' | 'error';
  model: string;
  manufacturer: string;
  serialNumber: string;
  uHeight: number; // 设备高度（U位）
  installDate: string;
  maintenanceDate: string;
  powerConsumption: number; // 功耗（W）
  weight: number; // 重量（kg）
  dimensions: {
    width: number;
    depth: number;
    height: number;
  };
  description?: string;
}

// 机柜数据接口
export interface CabinetData {
  id: string;
  name: string;
  model: string;
  manufacturer: string;
  location: string;
  totalU: number; // 总U位
  usedU: number; // 已使用U位
  temperature: number;
  humidity: number;
  powerUsage: number; // 功耗（W）
  status: 'normal' | 'warning' | 'critical';
  position: {
    x: number;
    y: number;
    z: number;
  };
  dimensions: {
    width: number;
    depth: number;
    height: number;
  };
  devices: DeviceData[];
  floorNumber?: number;
  roomId?: string;
}

// 预定义的机柜模型
export const PREDEFINED_CABINET_MODELS = {
  standard: {
    name: '标准服务器机柜',
    width: 600,
    depth: 800,
    height: 2000,
    totalU: 42
  },
  compact: {
    name: '紧凑型机柜',
    width: 600,
    depth: 600,
    height: 1800,
    totalU: 36
  },
  deep: {
    name: '深型服务器机柜',
    width: 600,
    depth: 1000,
    height: 2000,
    totalU: 42
  },
  wallMount: {
    name: '壁挂式机柜',
    width: 600,
    depth: 450,
    height: 900,
    totalU: 18
  }
};